<admintpl file="header" />
<body class="J_scroll_fixed">
	<div class="wrap J_check_wrap">
		<ul class="nav nav-tabs">
	        <li class="active"><a href="#A" data-toggle="tab">基本属性</a></li>
	        <li><a href="#B" data-toggle="tab">SEO设置</a></li>
	        <li><a href="#C" data-toggle="tab">模板设置</a></li>
	    </ul>
		<form class="form-horizontal J_ajaxForm" name="myform" id="myform" action="{:u('AdminTerm/edit_post')}" method="post">
		 <input type="hidden" name="term_id" value="{$data.term_id}" />
		 	<div class="tabbable">
		        <div class="tab-content">
		          <div class="tab-pane active" id="A">
		          	<table cellpadding="2" cellspacing="2" width="100%">
							<tbody>
								<tr>
									<td width="180">上级:</td>
									<td>
										<select name="parent">
												<option value="0">作为一级菜单</option>
												<foreach name="terms" item="vo">
													<php>$selected=$data['parent']==$vo['term_id']?"selected":""</php>
										        	<option value="{$vo.term_id}" {$selected}>{$vo.spacer}{$vo.name}</option>
												</foreach>
										</select>
									</td>
								</tr>
								<tr>
									<td>名称:</td>
									<td><input type="text" class="input" name="name" value="{$data.name}"><span class="must_red">*</span></td>
								</tr>
								<tr>
									<td>描述:</td>
									<td><textarea name="description" rows="5" cols="57">{$data.description}</textarea></td>
								</tr>
								<tr>
									<td>类型:</td>
									<td><select name="taxonomy" class="normal_select">
											<foreach name="taxonomys" item="vo">
												<php>$selected=$data['taxonomy']==$key?"selected":""</php>
									        	<option value="{$key}" {$selected}>{$vo}</option>
											</foreach>
									</select></td>
								</tr>
							</tbody>
						</table>
		          </div>
		           <div class="tab-pane" id="B">
		           		<table cellpadding="2" cellspacing="2" width="100%">
							<tbody>
								<tr>
									<td width="180">SEO标题:</td>
									<td><input type="text" class="input" name="seo_title" value="{$data.seo_title}"></td>
								</tr>
								<tr>
									<td>SEO关键字:</td>
									<td><input type="text" class="input" name="seo_keywords" value="{$data.seo_keywords}"></td>
								</tr>
								<tr>
									<td>SEO描述:</td>
									<td><textarea name="seo_description" rows="5" cols="57">{$data.seo_description}</textarea></td>
								</tr>
							</tbody>
						</table>
		           </div>
		           <div class="tab-pane" id="C">
		           		<table cellpadding="2" cellspacing="2" width="100%">
							<tbody>
								<php>$tpl_list=sp_admin_get_tpl_file_list();</php>
								<tr>
									<td width="180">列表页模板:</td>
									<td>
										<php>
											$list_tpls=$tpl_list;
											unset($list_tpls['list']);
										</php>
					              		<select  class="normal_select" name="list_tpl">
					              			<option value="list">list{:C("TMPL_TEMPLATE_SUFFIX")}</option>
					              			<foreach name="list_tpls" item="vo">
					              				<php>$template_selected=$data['list_tpl']==$vo?"selected":"";</php>
					              				<option value="{$vo}" {$template_selected}>{$vo}{:C("TMPL_TEMPLATE_SUFFIX")}</option>
					              			</foreach>
					              		</select>
									</td>
								</tr>
								<tr>
									<td>单文章模板:</td>
									<td>
										<php>
											$article_tpls=$tpl_list;
											unset($article_tpls['article']);
										</php>
					              		<select  class="normal_select" name="one_tpl">
					              			<option value="article">article{:C("TMPL_TEMPLATE_SUFFIX")}</option>
					              			<foreach name="article_tpls" item="vo">
					              				<php>$template_selected=$data['one_tpl']==$vo?"selected":"";</php>
					              				<option value="{$vo}" {$template_selected}>{$vo}{:C("TMPL_TEMPLATE_SUFFIX")}</option>
					              			</foreach>
					              		</select>
									</td>
								</tr>
							</tbody>
						</table>
		           </div>
		        </div>
	        </div>
			
			
		      <div class="form-actions">
		           <button class="btn btn-primary btn_submit J_ajax_submit_btn"type="submit">提交</button>
		      		<a class="btn" href="{:U('AdminTerm/index')}">返回</a>
		      </div>
		</form>
	</div>
	<script type="text/javascript" src="__ROOT__/statics/js/common.js"></script>
</body>
</html>